package com.ts.api.module.channel.controller;

import com.gitee.apanlh.web.model.vo.ResultVO;
import com.ts.api.module.channel.service.ChannelResetFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 重置流程，如果今天24点之前没有跟踪用户任何操作则检查时返回true
 *
 * @author caoxin
 */
@RestController
public class ChannelResetFlowController {

    @Autowired
    private ChannelResetFlowService channelResetFlowService;

    /**
     * 检查
     */
    @GetMapping("/channel/resetFlow/check")
    public ResultVO<Object> check() {
        Boolean checkResult = this.channelResetFlowService.check();

        this.channelResetFlowService.track();

        return ResultVO.suc(checkResult);
    }

}
